---
page_title: "cloudflare_access_mutual_tls_certificate Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a Cloudflare Access Mutual TLS Certificate resource.
  Mutual TLS authentication ensures that the traffic is secure and
  trusted in both directions between a client and server and can be
   used with Access to only allows requests from devices with a
   corresponding client certificate.
---

# cloudflare_access_mutual_tls_certificate (Resource)

Provides a Cloudflare Access Mutual TLS Certificate resource.
Mutual TLS authentication ensures that the traffic is secure and
trusted in both directions between a client and server and can be
 used with Access to only allows requests from devices with a
 corresponding client certificate.

~> It's required that an `account_id` or `zone_id` is provided and in
   most cases using either is fine. However, if you're using a scoped
   access token, you must provide the argument that matches the token's
   scope. For example, an access token that is scoped to the "example.com"
   zone needs to use the `zone_id` argument.

## Example Usage

```terraform
resource "cloudflare_access_mutual_tls_certificate" "my_cert" {
  zone_id              = "0da42c8d2132a9ddaf714f9e7c920711"
  name                 = "My Root Cert"
  certificate          = var.ca_pem
  associated_hostnames = ["staging.example.com"]
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The name of the certificate.

### Optional

- `account_id` (String) The account identifier to target for the resource. Conflicts with `zone_id`.
- `associated_hostnames` (List of String) The hostnames that will be prompted for this certificate.
- `certificate` (String) The Root CA for your certificates.
- `zone_id` (String) The zone identifier to target for the resource. Conflicts with `account_id`.

### Read-Only

- `fingerprint` (String)
- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
# Account level import.
$ terraform import cloudflare_access_mutual_tls_certificate.example account/<account_id>/<mutual_tls_certificate_id>

# Zone level import.
$ terraform import cloudflare_access_mutual_tls_certificate.example zone/<zone_id>/<mutual_tls_certificate_id>
```
